package com.hospital.data.simulation.controller;

import com.hospital.common.base.Result;
import com.hospital.common.dto.data.simulation.InspectionReportDto;
import com.hospital.common.vo.data.simulation.InspectionReportVo;
import com.hospital.data.simulation.service.InspectionReportService;
import jakarta.validation.Valid;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import java.util.List;

/**
 * 检查报告相关接口
 * @author yhn
 * @version 1.0
 */
@RestController
@RequestMapping("/inspectionResult")
public class InspectionResultController {
    @Autowired
    private InspectionReportService inspectionReportService;

    /**
     * 查询检查报告
     */
    @PostMapping("/query")
    public Result<List<InspectionReportVo>> query(@Valid @RequestBody InspectionReportDto inspectionReportDto){
        return Result.success(inspectionReportService.query(inspectionReportDto));
    }
}
